## Create and Export Cross Tables

table_unc_LISS <- table(clean_LISS_data$high_meaning)
table_unc_LISS <- prop.table(table_unc_LISS)
meaning_unc_LISS <- table_unc_LISS[2]


table_tel_LISS <- table(clean_LISS_data$high_meaning, clean_LISS_data$high_telecommute)
table_tel_LISS <- prop.table(table_tel_LISS)
meaning_tel_LISS <- table_tel_LISS[2,2]

table_flex_LISS <- table(clean_LISS_data$high_meaning, clean_LISS_data$high_flex)
table_flex_LISS <- prop.table(table_flex_LISS)
meaning_flex_LISS <- table_flex_LISS[2,2]

table_tel_flex_LISS <- table(clean_LISS_data$high_meaning, clean_LISS_data$high_telecommute, clean_LISS_data$high_flex)
table_tel_flex_LISS <- prop.table(table_tel_flex_LISS)
meaning_tel_flex_LISS <- table_tel_flex_LISS[2,2,2]

frequencies_LISS <- data.frame(meaning_unc_LISS, meaning_tel_LISS, meaning_flex_LISS, meaning_tel_flex_LISS)
colnames(frequencies_LISS) <- c("Mean", "$\\times$ Telecommuting", 
                                "$\\times$ Schedule Adaptability", 
                                "$\\times$ Both")
rownames(frequencies_LISS) <- "High Meaning"

table_flex_LISS <- xtable::xtable(frequencies_LISS)
writeLines(xtable::print.xtable(table_flex_LISS, include.rownames = TRUE, include.colnames = TRUE, floating = FALSE, type = "latex", sanitize.colnames.function = identity), file.path(graph_dir, "table_flex_tel_LISS.txt"))